package com.crack.nga2.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;

import com.crack.nga2.R;

public class RegisterActivity extends BaseActivity {
    private EditText editName, editPassword, editEmail;
    private ImageView ivChecked;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        editName = (EditText) findViewById(R.id.edit_name);
        editPassword = (EditText) findViewById(R.id.edit_password);
        editEmail = (EditText) findViewById(R.id.edit_email);
        ivChecked = (ImageView) findViewById(R.id.iv_check_bg);
    }

    private boolean isChecked = true;

    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.action_return:
                finishForAnimation();
                break;
            case R.id.btn_register:
                //确认注册
                break;
            case R.id.iv_check_bg:
                //同意协议
                if (isChecked) {
                    ivChecked.setImageResource(R.drawable.check_bg_checked);
                } else {
                    ivChecked.setImageResource(R.drawable.check_bg);
                }
                isChecked = !isChecked;
                break;
        }
    }
}
